﻿<?xml version="1.0" encoding="utf-8"?>

<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net" />
  </configSections>
  <log4net>
    <root>
      <level value="DEBUG" />
      <appender-ref ref="LogFileAppender" />
      <appender-ref ref="LogFileAppenderXml" />
      <!--<appender-ref ref="UdpAppender" />-->
      <appender-ref ref="ConsoleAppender" />
    </root>

    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
      <threshold value="INFO" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date{HH:mm:ss} %-5level - %message%newline" />
      </layout>
    </appender>

    <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="Logs\log.txt" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
      </layout>
    </appender>

    <appender name="LogFileAppenderXml" type="log4net.Appender.RollingFileAppender">
      <file value="Logs\log-chainsaw.xml" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <datePattern value="yyyyMMdd" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
        <locationInfo value="true" />
      </layout>
    </appender>

    <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
      <remoteAddress value="localhost" />
      <remotePort value="49900" />
      <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
        <locationInfo value="true" />
      </layout>
    </appender>

  </log4net>
</configuration>